
package com.benimetum.items;

/**
 *
 * @author Ethem Cem Ozkan
 * @email ethemcem.ozkan@gmail.com
 * No 07110604
 */
public class Answer
{
    private String id;
    private int score;
    private Teacher teacher;//notlandıran
    private Student student;//cevaplandıran
    private UploadedFile[] files;
    private String homeworkId;

    public Answer(String id, int score, Teacher teacher, Student student, UploadedFile[] files, String homeworkId) {
	  this.id = id;
	  this.score = score;
	  this.teacher = teacher;
	  this.student = student;
	  this.files = files;
	  this.homeworkId = homeworkId;
    }
    
    

    public UploadedFile[] getFiles() {
	  return files;
    }

    public String getHomeworkId() {
	  return homeworkId;
    }

    public String getId() {
	  return id;
    }

    public int getScore() {
	  return score;
    }

    public Student getStudent() {
	  return student;
    }

    public Teacher getTeacher() {
        if(teacher==null)
            return new Teacher(id, id, "Cevap Puanlandırılmadı", "", id, homeworkId);
	  return teacher;
    }

    public void setFiles(UploadedFile[] files) {
	  this.files = files;
    }

    public void setHomeworkId(String homeworkId) {
	  this.homeworkId = homeworkId;
    }

    public void setId(String id) {
	  this.id = id;
    }

    public void setScore(int score) {
	  this.score = score;
    }

    public void setStudent(Student student) {
	  this.student = student;
    }

    public void setTeacher(Teacher teacher) {
	  this.teacher = teacher;
    }
    
    
}
